package com.chijun.mform.create.mode;

import com.chijun.mform.FormBuilder;
import com.chijun.mform.create.fragment.FormAddProcessFragment;
import com.example.ccj.u.sqlite.TableField;
import com.example.ccj.u.sqlite.TableName;

import java.util.Collections;

/**
 * 审批节点
 * @author 驰珺
 * whechat   : chijun9
 * create at : 2024/11/17 20:18
 */
@TableName(FormBuilder.TABLE_FORM_APPROVE_PROCESS_NAME)
public class FormApproveProcess implements Comparable<FormApproveProcess> {
    public FormApproveProcess(){}

    //审批节点编号
    public long id;
    //审批节点名称
    public String name;
    //表单编号
    public long formId;
    //审批顺序
    public int orderColumn;
    //审批类型  默认审批人自己
    public int type = FormAddProcessFragment.SHEN_PI_REN_JIE_DIAN;

    //0:指定人员  1：发起人自己  2：发起人自选
    public int personType = FormAddProcessFragment.APPROVAL_SELECT_MODE_ZHI_DING;

    public int personNum = 1;//可选择人员数量

    //多人审批方式 0：会签 1：或签   默认会签
    public int duoRenShenPiFangShi = FormAddProcessFragment.APPROVAL_MODE_HUI_QIAN;
    //审批状态 0：等待  1：正在审批  2：审批通过  3：审批拒绝
    public int state;


    @Override
    public int compareTo(FormApproveProcess o) {
        return this.orderColumn - o.orderColumn;
    }

    @Override
    public String toString() {
        return "FormApproveProcess{" +
                "id=" + id +
                ", name='" + name + '\'' +
                ", formId=" + formId +
                ", orderColumn=" + orderColumn +
                ", type=" + type +
                ", personType=" + personType +
                ", personNum=" + personNum +
                ", duoRenShenPiFangShi=" + duoRenShenPiFangShi +
                ", state=" + state +
                '}';
    }
}
